import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { environment } from '@env/environment.prod';
import { LayoutDefaultComponent } from '@layout/default/default.component';


const routes: Routes = [
	{ path: '', pathMatch: 'full', redirectTo: '/welcome' },
	{ path: 'welcome', component: LayoutDefaultComponent, loadChildren: () => import('./welcome/welcome.module').then(m => m.WelcomeModule) },
	{ path: 'base', loadChildren: () => import('./base/base.module').then(m => m.BaseModule) },
	{ path: 'passport', loadChildren: () => import('./passport/passport.module').then(m => m.PassportModule) },
	{ path: '**', redirectTo: 'base/exception/404' }
];

@NgModule({
	imports: [
		RouterModule.forRoot(routes, {
			useHash: environment.useHash
		})
	]
})
export class RouteRoutingModule { }
